<template>
	<view class="">
		<div class="homebj">
		    <div class="hdbmall yrxmdmargin">
		        <div class="hdbmlist" v-for="(el,ind) in datas">
		            <div class="yrxmdleft">
		                <img v-if="el.userImg != ''" :src="el.userImg" class="yrxmdimg">
		                <img v-if="el.userImg == ''" :src="getImg('touxiang.png')" class="yrxmdimg">
		            </div>
		            <div class="yrxmdright">
		                <div class="yrxmdname">{{el.name}}</div>
		                <div class="yrxmdtime">{{el.createTime}}</div>
		                <div class="dwxqcontent">{{el.content}}</div>
		            </div>
		        </div>
		    </div>
		</div>
	</view>
</template>

<script>
	import web from '../../components/utils/request.js'
	export default{
		data(){
			return{
				wareId: 0,
				datas: [],
				pageNo: 1,
				pageSize: 20,
			}
		},
		onLoad(options) {
			this.wareId=options.wareId;
		},
		onReady() {
			this.getData();
		},
		methods:{
			getImg(url) {
				return 'https://ruianm.tour-ma.com/r/cms/www/m/huodong/img/' + url;
			},
			getImg1(url) {
				return 'https://ruianm.tour-ma.com' + url;
			},
			getData(){
				var url = "/commentsList.jspx";
				var arg = {wareId:this.wareId,pageNo:this.pageNo,pageSize:this.pageSize};
				var that=this;
				web.httpPost(that, url, arg, function(res) {
					that.datas = res.data.data;
				})
			}
		}
	}
</script>

<style>
	@import url("@/components/css/datascss.css");
</style>
